import React, { useEffect } from 'react'

import { Button, ErrorBlock } from 'antd-mobile'
import { useNavigate } from "react-router-dom";

import styles from './index.module.css'

function My() {

	let navigate = useNavigate()

	//[]空数组相当于componentDidMount
	useEffect(() => {
		return () => {


		}
	}, []);

	function clickRefresh() {
		//console.log('点击了刷新');
		navigate(0)
	}


	//渲染组件
	return (
		<div className={styles.my_container}>
			<ErrorBlock status='default' title='页面出错啦~' fullPage description={<span>网络繁忙</span>}>
				<Button onClick={clickRefresh} color='primary'>点击刷新</Button>
			</ErrorBlock>
		</div>
	)
}

export default My;
